package cn.repository;

import cn.entity.Tag;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.UUID;

/**
 * @author m on 2023/1/31
 * Description:
 */
public interface TagRepository extends JpaRepository<Tag, UUID> {

    Tag findByName(String name);


    @Query("select t from Tag t where t.name like concat('%',:kw,'%') ")
    List<Tag> findByQuery(String kw);

    List<Tag> findTagByOpenFalse();



}
